package com.sloera.nowcoder;

import java.util.Scanner;

/**
 * class com.sloera.nowcoder
 * user sloera
 * date 2022/2/23
 */
public class HJ23 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            final String alphabet = in.nextLine();
            resolve(alphabet);
            System.out.println();
        }
    }

    private static void resolve(String alphabet) {
        int[] count = new int[26];
        for (int i = 0; i < alphabet.length(); i++) {
            count[alphabet.charAt(i) - 'a']++;
        }
        int min = alphabet.length();
        for (int i = 0; i < count.length; i++) {
            if (count[i] > 0 && count[i] < min) {
                min = count[i];
            }
        }
        for (int i = 0; i < alphabet.length(); i++) {
            if (count[alphabet.charAt(i) - 'a'] > min) {
                System.out.print(alphabet.charAt(i));
            }
        }
    }

}